<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('油品配置')"/>
    <th:block th:include="include :: select2-css"/>
    <th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body>
<div class="main-content">
    <form id="form-shop-edit" class="form-horizontal">
        <h4 class="form-header h4">支付配置</h4>
        <th:block th:with="paySwitchConfig=${pay.switch}">
        <div class="form-group" th:each="config:${paySwitchConfig}">
            <label class="col-sm-3 control-label" th:if="${config.productId == 1}" th:text="${config.productCategory+config.productName}"></label>
            <div class="col-sm-10">
                <label class="checkbox-inline">
                    <input type="checkbox" th:if="${config.flag == 'wx'}" th:value="${conifg.value}" th:text="${config.configName}"></label>
                    <input type="checkbox" th:if="${config.flag == 'balance'}" th:value="${conifg.value}" th:text="${config.configName}"></label>
                    <input type="checkbox" th:if="${config.flag == 'offline'}" th:value="${conifg.value}" th:text="${config.configName}"></label>
            </div>
        </div>
        </th:block>
        <th:block th:with="paySwitchConfig=${pay.switch}">
            <div class="form-group" th:each="config:${paySwitchConfig}">
                <label class="col-sm-3 control-label" th:if="${config.productId == 2}" th:text="${config.productCategory+config.productName}"></label>
                <div class="col-sm-10">
                    <label class="checkbox-inline">
                        <input type="checkbox" th:if="${config.flag == 'wx'}" th:value="${conifg.value}" th:text="${config.configName}"></label>
                    <input type="checkbox" th:if="${config.flag == 'balance'}" th:value="${conifg.value}" th:text="${config.configName}"></label>
                    <input type="checkbox" th:if="${config.flag == 'offline'}" th:value="${conifg.value}" th:text="${config.configName}"></label>
                </div>
            </div>
        </th:block>
        <th:block th:with="paySwitchConfig=${pay.switch}">
            <div class="form-group" th:each="config:${paySwitchConfig}">
                <label class="col-sm-3 control-label" th:if="${config.productId == 3}" th:text="${config.productCategory+config.productName}"></label>
                <div class="col-sm-10">
                    <label class="checkbox-inline">
                        <input type="checkbox" th:if="${config.flag == 'wx'}" th:value="${conifg.value}" th:text="${config.configName}"></label>
                    <input type="checkbox" th:if="${config.flag == 'balance'}" th:value="${conifg.value}" th:text="${config.configName}"></label>
                    <input type="checkbox" th:if="${config.flag == 'offline'}" th:value="${conifg.value}" th:text="${config.configName}"></label>
                </div>
            </div>
        </th:block>
        <h4 class="form-header h4"></h4>
        <div class="row">
            <div class="col-sm-offset-2 col-sm-2">
                <button type="button" class="btn btn-sm btn-success" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>
            </div>
        </div>
    </form>
</div>

<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: bootstrap-fileinput-js"/>
<script>
    var prefix = ctx + "back/shop";
</script>
</body>
</html>